"""
from selenium import webdriver
from time import sleep
option = webdriver.ChromeOptions() # chrome浏览器配置项
option.add_experimental_option("detach", True)# 浏览器不会自动关闭
driver = webdriver.Chrome(options=option)
driver.get("http://www.bjhospital.net/")
driver.maximize_window()
from selenium.webdriver.common.by import By
driver.find_element(By.CLASS_NAME,"keyword").send_keys("泌尿外科")
driver.find_element(By.CLASS_NAME,"btn").click()
driver.find_element(By.XPATH,"/html/body/div[4]/ul/li[1]/div[1]/h5/a").click()
win = driver.window_handles # 获取全部的句柄
driver.switch_to.window(win[-1])
text_result = driver.find_element(By.XPATH,"/html/body/div[3]/div/div/article/h1").text
assert text_result == "浙江省人民医院毕节医院医学装备维修市场调研询价公告"
print(driver.title)
sleep(3)
driver.quit()
"""

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait

class Searchs:
    def __init__(self,driver):
        self.driver = driver
        self.driver.get("http://www.bjhospital.net/")
        self.driver.maximize_window()
        driver.implicitly_wait(10)            #打开网址
    def input(self, text: str):
        self.driver.find_element(By.CLASS_NAME, 'keyword').send_keys(text)
        WebDriverWait(self.driver, 10, 0.5).until(EC.presence_of_element_located((By.CLASS_NAME, 'keyword'))).send_keys(text)

    def findinput(self):
        self.driver.find_element(By.CLASS_NAME, 'btn').click()

    def Tagname1(self):




































